#include "mystdio.h"
#include <stdio.h>
int main()
{
    FILE_ *fp = fopen_("./log.txt","w");
    if(fp == NULL)
    {
        return 1;
    }
    int cnt = 10;
    const char *msg = "hello linux";
    while(cnt--)
    {
        fwrite_(msg, strlen(msg), fp);
        sleep(1);
        fflush_(fp);
        // if(cnt == 5) fflush_(fp);
        printf("count:%d\n",cnt);

    }

    fclose_(fp);

    return 0;
}
